package com.companyName.sample.service.impl.sys;

import com.companyName.sample.api.service.sys.LogService;
import com.companyName.sample.common.util.PageInfo;
import com.companyName.sample.bean.dto.sys.SysLogDto;
import com.companyName.sample.data.entity.SysLogPo;
import com.companyName.sample.data.mapper.SysLogMapper;
import com.companyName.sample.service.business.LogBiz;
import com.companyName.sample.service.business.UserBiz;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @description：
 * @author：gj
 * @date：2016/03/30 10:40
 */
@Service
public class LogServiceImpl implements LogService {
    private static final Logger logger = LoggerFactory.getLogger(LogServiceImpl.class);
    @Autowired
    private LogBiz logBiz;

    @Override
    public void insertLog(SysLogDto sysLogDto) {
        // todo 转换 SysLogDto -- PO
        SysLogPo sysLogPo = new SysLogPo();
        BeanUtils.copyProperties(sysLogDto, sysLogPo);
        logBiz.loginInsertLog(sysLogPo);
    }

    @Override
    public void findDataGrid(PageInfo pageInfo) {
        // todo 转换 pageInfo
        logBiz.loginFindDataGrid(pageInfo);
    }
}
